<?php

namespace ThirdPartyAuthorizeBundle\Controller;

use Manages\ProjectController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Acl\Exception\Exception;
use ThirdPartyAuthorizeBundle\thirdPartyAuthorize\thirdParty\wechat\publicPlatform\PublicPlatformAuthorize;
use ThirdPartyAuthorizeBundle\thirdPartyAuthorize\thirdParty\wechat\publicPlatform\PublicPlatformShare;


class TestController
{
    public function indexAction()
    {
          exit();
//        $publicPlatformAuthorize = new PublicPlatformAuthorize($this->container);
//        $url = $this->get('utils.requests')->getCurrentRoute();
//
//        $res = $publicPlatformAuthorize->publicPlatformAuthorize($url,2,'123');
//        if ($res['errorCode'] != 0){
//            return new Response($res,'200',array('Content-Type'=>'application/json'));
//        }
//
//        $weCharUserInfo = $publicPlatformAuthorize->getWeCharUserInfo();
//        throw new Exception($weCharUserInfo->getCountry());

//        $url = $this->get('utils.requests')->getCurrentRoute();
//        $publicPlatformShare = new PublicPlatformShare($this->container);
//        $res = $publicPlatformShare->shareParameter($url);
//        return new Response(json_encode($res),'200',array('Content-Type'=>'application/json'));
    }
}
